The CT SET LEGEND TEXT command sets the text of the specified legend item.
legendItem is the number of the series (or category for a pie chart) in the legend. However, if the legend order has been reversed, legendItem reflects the original order, not the reversed order.
This example changes the legend text of the chart specified by $ChartID.
ARRAY STRING(20;aLegend;3)
aLegend{1}:="Sales"
aLegend{2}:="Marketing"
aLegend{3}:="Engineering"
For($i;1;3)
CT SET LEGEND TEXT(vArea;$ChartID;$i;aLegend{$i})
End for